import request from "@/utils/request";

export function getApiMetadata(id) {
  return request({
    url: "/api/api-metadatas/" + id,
    method: "get",
  });
}

export function getApiMetadatas(paramters) {
  return request({
    url: "/api/api-metadatas",
    method: "get",
    params: paramters,
  });
}

export function addApiMetadata(api) {
  return request({
    url: "/api/api-metadatas",
    method: "post",
    data: api,
  });
}

export function updateApiMetadata(api) {
  return request({
    url: "/api/api-metadatas",
    method: "post",
    data: api,
  });
}

export function deleteApiMetadata(id) {
  return request({
    url: "/api/api-metadatas/" + id,
    method: "delete",
  });
}
